home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Macintosh Demo Applications CD
/
Apple-MacintoshDemoApplicationsCD-1.0-1992.iso
/
More Information
/
QuicKeys
/
For Programmers Only.sea
/
Pascal Examples
/
extensions.p
< prev
next >
Wrap
Text File
|
1991-06-22
|
5KB
|
135 lines
(* $Workfile$ *)
(* $Revision$ *)
{ QuicKeys2™ extentions defines}
{ © 1990 CE Software, Inc. All rights reserved.}
{ For QuicKeys 2 Extension Sample source code you have a royalty-free right }
{ to include object code derived from this Sample source code in programs }
{ that you develop. You also have the right to use, distribute, and license }
{ such programs to third parties without payment of any further license fees }
{ to CE Software, Inc., so long as a copyright notice sufficient to protect }
{ your copyright for your software in the United States or any other country; }
{ is included in the graphic display of your software and on the labels }
{ affixed to the media on which your software is distributed. }
{ WHEN WHO WHAT}
{ 9/5 mkg created file}
{•••••}
{ 5/29 mkg update for QK version 2.1}
{•••••}
unit extensions;
interface
const
{ possible selectors for user interface routine }
newUI = 0; { you're being called to create a new extension. }
{ Initialize your private data accordingly }
initUI = 1; { Your dialog items have been added to QuicKeys' dialog }
{ Do any setup processing during this call }
hitUI = 2; { The user clicked or typed into one of your dialog items }
doneUI = 3; { Clean up your act before the dialog is disposed }
{ bits in ExtensionQueue.flags. all other bits are reserved and should be zero. }
PeriodicFlag = 1; { your routine will be run every GetNextEvent,}
{ EventAvail, or SystemTask call }
AbortFlag = 2; { set if you need to be told to stop what you're doing }
DontLoadFlag = $8000; { set if you don't want to be loaded }
{ possible selectors for execute routine }
initX = -1; { your have just been loaded. Your resource file is still open }
regularX = 0; { execute your key. }
periodicX = 1; { PeriodicFlag is set and it's SystemTask, GetNextEvent, }
{ or EventAvail time }
abortX = 2; { QK is aborting/cancelling what it's doing and you have AbortFlag }
{ set. You may NOT do things that might move memory }
{ possible types of periodic calls }
periodicDoRun = 0; { SystemTask }
periodicGNE = 1; { GetNextEvent }
periodicEAvail = 2; { EventAvail }
{ QuicKeys 2™ driver name }
QuicKeysDriverName = '.Quickeys';
{ QuicKeys 2™ driver control calls }
QK2GetGlobals = 8;
QK2PlayByName = 17;
QK2PlayByPtr = 18;
QK2GetStatus = 19;
QK2Kill = 20;
QK2OnOff = 21;
QK2Pause = 23;
QK2GetPosition = 24;
QK2SetPosition = 25;
QK2GetVersion = 26;
{ possible QuicKeys 2™ status }
QK2IsDisabled = -1;
QK2InUserInterface = -2;
QK2BusyNotPlaying = -3;
QK2IsIdle = 0;
QK2InPlayFast = 1;
QK2InPlayFastPaused = 2;
QK2InRecordFast = 3;
QK2InRecordFastPaused = 4;
QK2InPlayRT = 5;
QK2InPlayRTPaused = 6;
QK2InRecordRT = 7;
QK2InRecordRTPaused = 8;
type
{ extension data format }
ExtensionDataHeader = record
strTitle: string[15]; { name of extension }
ostCreator: OSType; { creator of extension (filled in by QuicKeys 2™) }
wLength: integer; { Length of record }
end;
{ extension execute queue format }
ExecuteQueue = record
pNext: Ptr; { pointer to next extension (filled in by QuicKeys 2™) }
ostCreator: OSType; { creator of extension (filled in by QuicKeys 2™) }
flags: integer; { flags for QuicKeys 2™ }
strFName: str31; { extension's file name (filled in by QuicKeys 2™) }
sicn: packed array[1..32] of char; { store SICN to display here }
lRefCon: longint; { for extension's use }
entryPoint: char; { execution starts here }
end;
ExecuteQueuePtr = ^ExecuteQueue;
{ QuicKeys 2™ globals available for your use }
PublicQK2Globals = record
private1: packed array [1..524] of char;
wDestVol: integer; { System folder volume }
lDestDirID: longint; { System folder dirID }
lPrefsDir: longint; { Preferences folder dirID }
lQKDir: longint; { QuicKeys folder dirID }
lKeySetDir: longint; { KeySet folder dirID }
lMacroDir: longint; { Macros folder dirID }
lSeqDir: longint; { Sequences folder dirID }
lExtDir: longint; { Extensions folder dirID }
lClipDir: longint; { Clipboards folder dirID }
private3: packed array [1..70] of char;
pExtensions: ExecuteQueuePtr; { queue of externals loaded in at boot time }
private4: packed array [1..1338] of char;
wCurKeyType: integer; { type of the key in ucaCurKey }
ucaCurKey: packed array [1..2048] of char; { This is a key being executed }
ucaTypeString: packed array [1..256] of char; { put a string here for QK2 to type.
Make sure that ucaTypeString[0] = 0 before you do. }
end;
implementation
end.